package main

import (
	"log"

	"gorm.io/driver/mysql"
	"gorm.io/gorm"
)

func main() {
	dsn := "root:@tcp(127.0.0.1:3306)/gin_oj?charset=utf8mb4&parseTime=True&loc=Local"
	db, err := gorm.Open(mysql.Open(dsn), &gorm.Config{})
	if err != nil {
		log.Panic("database connect error: ", err)
	}
	db.Exec("drop table category_basic")
	db.Exec("drop table submit_basic")
	db.Exec("drop table user_basic")
	db.Exec("drop table problem_basic")
	db.Exec("drop table problem_category")
}
